package com.persons.springbootproject.controller;

import com.persons.springbootproject.entity.Person;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author CX
 * @Creat
 */
@RestController
public class PersonController {

    @RequestMapping("/findPerson")
    public Map<Integer, Person> findPerson(){
        Map<Integer,Person> map=new HashMap<>();
        map.put(1,new Person("张三","男",20,"成都",new Date()));
        map.put(2,new Person("李四","男",21,"成都",new Date()));
        map.put(3,new Person("王五","男",22,"成都",new Date()));
        return map;
    }
}
